<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basedata/basedata/base_processline.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basedata/basedata/base_processline.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'processline_id',
                footer: "Foots",
                cnName: '工艺路线',
                name: 'basedata/base_processline',
                url: "/base_processline/",
                sortName: "processline_id"
            });
            const editFormFields = ref({"processlinecode":"","processlinename":""});
            const editFormOptions = ref([[{"title":"工艺路线编号","field":"processlinecode","type":"text"}],
                              [{"title":"工艺路线名称","field":"processlinename","type":"text"}]]);
            const searchFormFields = ref({"processlinecode":"","processlinename":""});
            const searchFormOptions = ref([[{"title":"工艺路线编号","field":"processlinecode","type":"like"},{"title":"工艺路线名称","field":"processlinename","type":"like"}]]);
            const columns = ref([{field:'processline_id',title:'主键ID',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'processlinecode',title:'工艺路线编号',type:'string',sort:true,width:220,align:'left',sort:true},
                       {field:'processlinename',title:'工艺路线名称',type:'string',link:true,sort:true,width:220,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:120,align:'left'},
                       {field:'CreateID',title:'创建人编号',type:'int',width:120,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:120,align:'left',sort:true},
                       {field:'Modifier',title:'更新人',type:'string',width:120,align:'left'},
                       {field:'ModifyDate',title:'更新时间',type:'datetime',width:120,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人编号',type:'int',width:120,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "工艺路线—工序列表",
                table: "base_processlinelist",
                columns: [{field:'processlinelist_id',title:'主键Id',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'processline_id',title:'工艺路线',type:'int',bind:{ key:'processline',data:[]},width:110,align:'left',sort:true},
                       {field:'processlinetype',title:'类型',type:'string',bind:{ key:'processlinetype',data:[]},width:220,edit:{type:'select'},align:'left'},
                       {field:'process_id',title:'工序',type:'int',bind:{ key:'process',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'processlinedown_id',title:'工艺路线',type:'int',bind:{ key:'processline',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'sequence',title:'顺序',type:'string',width:220,edit:{type:'number'},align:'left'},
                       {field:'submitworkmatch',title:'报工数配比',type:'int',width:110,edit:{type:'text'},align:'left'},
                       {field:'CreateID',title:'创建人编号',type:'int',width:120,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:120,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:120,align:'left',sort:true},
                       {field:'Modifier',title:'更新人',type:'string',width:120,align:'left'},
                       {field:'ModifyDate',title:'更新时间',type:'datetime',width:120,align:'left',sort:true},
                       {field:'ModifyID',title:'更新人编号',type:'int',width:120,hidden:true,align:'left'}],
                sortName: "processlinelist_id",
                key: "processlinelist_id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
